package com.huizluo.module1;

//五子棋打印
public class FiveGame {
    private final int x = 16;
    private final int y = 16;

    public static void main(String[] args) {
        FiveGame f = new FiveGame();
        for (int i=-1;i<f.x;i++){
            for (int j=-1;j<f.y;j++){

                if (i == -1 && j == -1){
                    System.out.print(" ");
                }else  if (i == -1 && j != -1){
                    String o = Integer.toHexString(j);
                    if (j == f.y - 1){
                        System.out.println(" "+ o);
                    }else{
                        System.out.print(" "+ o);
                    }
                }else  if (i != -1 && j == -1) {
                    String o = Integer.toHexString(i);
                    System.out.print(o);
                }else if (j == f.y - 1){
                    System.out.println(" +");
                }else{
                    System.out.print(" +");
                }
            }
        }
    }
}
